create or replace function notify_data_changes() returns trigger as $$
declare
       payload TEXT;
BEGIN
     payload :=TG_TABLE_NAME || ',' || TG_OP||',' || NEW.id;
     perform pg_notify('data_changes',payload);
     return new;
END;
$$ LANGUAGE plpgsql;

CREATE TRIGGER data_changes_trigger
AFTER INSERT OR UPDATE ON meta_table
FOR EACH ROW EXECUTE FUNCTION notify_data_changes();